<script>
function setname(){

  var monindex=document.getElementById("CiuacademicperiodStartDateMonth").value;
  var yearindex=document.getElementById("CiuacademicperiodStartDateYear").value;
  var monhastaindex=document.getElementById("CiuacademicperiodEndDateMonth").value;
  var yeahastarindex=document.getElementById("CiuacademicperiodEndDateYear").value;
  var index = monindex * 1;
  var name=yearindex+"-"+monindex+" a "+monhastaindex+"-"+yeahastarindex;
  document.getElementById('CiuacademicperiodName').value=name;
}




</script>

<div class="ciuacademicperiods form">
<?php echo $this->Form->create('Ciuacademicperiod');?>
	<fieldset>
		<legend><?php __('Edit Ciuacademicperiod'); ?></legend>
	<?php
		echo $this->Form->input('id');
		echo $this->Form->input('name',array('readonly'=>'true'));
		echo $this->Form->input('start_date', array('class'=>'selectdateshort','onChange'=>'javascript: setname();return false'));
		echo $this->Form->input('end_date',array('class'=>'selectdateshort','onChange'=>'javascript: setname();return false'));
		echo $this->Form->input('preregistration_start',array('class'=>'selectdateshort'));
		echo $this->Form->input('preregistration_end',array('class'=>'selectdateshort'));
		echo $this->Form->input('registration_start',array('class'=>'selectdateshort'));
		echo $this->Form->input('registration_end',array('class'=>'selectdateshort'));
		echo $this->Form->input('classes_start',array('class'=>'selectdateshort'));
		echo $this->Form->input('classes_end',array('class'=>'selectdateshort'));
		echo $this->Form->input('score_registration_start',array('class'=>'selectdateshort'));
		echo $this->Form->input('score_registration_end',array('class'=>'selectdateshort'));
		echo $this->Form->input('score_publication',array('class'=>'selectdateshort'));
		echo $this->Form->input('courses_publication',array('class'=>'selectdateshort'));
                echo $this->Form->input('isactive');
	?>
	</fieldset>
<?php echo $this->Form->end(__('Submit', true)) ;?>
</div>
